$(document).ready(function(){
	$("#start-time").datepicker({
		changeMonth:true,
		onClose:function(selectedDate){
			$("#end-time").datepicker("option","minDate",selectedDate);
		}
	});
	$("#end-time").datepicker({
		changeMonth:true,
		onClose:function(selectedDate){
			$("#start-time").datepicker("option","maxDate",selectedDate);
		}
	});


});

function showBg() {
        
		var bh = $("html").height();
    	var bw = $("html").width();
    	$("#fullbg").css({
            	height:bh,
            	width:bw,
            	display:"block"
     	});
    	$("#dialog").show();
    	}
    	//关闭灰色 jQuery 遮罩
function closeBg() {
    $("#fullbg,#dialog").hide();
		
}


function checkNumbers(){
  var num1 = document.getElementById("start-time");
  var num2 = document.getElementById("end-time");
  	if (num1.value > num2.value)
   			 num2.setCustomValidity("已组人数不应多于总人数");
}